package com.wangge.beforework;

import jp.sourceforge.qrcode.data.QRCodeImage;

import java.awt.image.BufferedImage;

/**
 * Created by jiabin on 17-8-8.
 */
public class TwoDimensionCodeImage implements QRCodeImage {
  BufferedImage bufImg;

  public TwoDimensionCodeImage(BufferedImage bufImg) {
    this.bufImg = bufImg;
  }

  @Override
  public int getHeight() {
    return bufImg.getHeight();
  }

  @Override
  public int getPixel(int x, int y) {
    return bufImg.getRGB(x, y);
  }

  @Override
  public int getWidth() {
    return bufImg.getWidth();
  }
}
